Copyright: Copyright © 1995 - 1998 S.A.D.E. s.a.r.l.


Window Spy

The Window Spy is a tool that lets you get information about the windows being displayed on your PC. You need this information if you want to control other windows, send messages to them or get data directly from them using another program.

For more information about the Window Spy, click on the item you are interested in.


The Display

Each line of the Window Spy display shows two or three items of information about a window.

The first item, a number preceded by a % sign, is the window identifier (usually described in Windows API documentation as the 'window handle'). It is a number that uniquely identifies that instance of that window. It is allocated when the window is created, so the number will not always be the same for that window. The % sign is used to indicate that an item is a window identifier to VDS commands and functions.

The second item, preceded by a # sign, shows the class name of the window. This is the value returned by the function @winclass(<window_id>). This may or may not be unique for a main window. For a child window (a control or dialog element) it usually describes the type of control. The # sign is not part of the class name but indicates to VDS that the string that follows is a class name.

The third item, a string in quotes which is not always present, shows the text contained in the window. This is the value returned by the function @wintext(<window_id>).

The position of lines in the display also conveys information. If a line is indented relative to the one above then the window is a child (in other words, owned by) the one above. Controls or dialog elements such as buttons and edit boxes are all children of the main window or a container like a toolbar or panel which is itself a child of a larger window.


WinList

When you click the WinList button, Window Spy displays a list of all the top-level windows present in the system. This information is oibtained using the LIST WINLIST command. If you select an item from the list you can use the Info, Position or Activate buttons to get more information about it.


Spy

Instead of picking the window you are interested in out of the list you can use the Spy button to select a window dynamically. Click Spy, then click the title bar of the window you want information about. As you move the cursor, the X and Y co-ordinates and the text contained in the window at that point (obtained using the @winatpoint() function) are displayed in the status bar.

When you click a window, Window Spy displays information about that window and its child windows in the same format as when you click the Info button.


Info

If you select an item from the window list and click the Info button, Window Spy displays information about the selected window and all its child windows. You would normally use this to get information about the controls (or dialog elements) belonging to a main window or dialog box.


Position

If you select an item from the window list and click Position, Window Spy displays the size and position of the selected item in a message box. This information is obtained using the @winpos() function.


Activate

If you select an item from the window list and click the Activate button, Window Spy will activate the selected window. This feature can be useful for showing hidden windows.


Help

The Help button displays this help file.


Quit

The Quit button closes the Window Spy.


status
The status bar displays prompts relating to the item below the cursor